package com.wyh.mapper.g3mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wyh.domain.po.g3po.G3Contractitem;
import com.wyh.domain.po.g3po.G3Formula;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface FormulaMapper extends BaseMapper<G3Formula> {
    Integer selectTypeById(@Param("id") Integer id);

    //根据合同费项查询三表类计费对应的金额
    Double selectThreeTablePriceById(@Param("item") G3Contractitem g3Contractitem, @Param("sql") String sql);
    //根据合同费项查询周期性计费对应的金额
    Double selectRecurringPriceById(@Param("item") G3Contractitem g3Contractitem, @Param("sql")String formula);
    //根据公式表id拿到对应的公式sql头
    String selectFormulaById(@Param("id") Integer id);

    Double selectPreDepositPriceById(@Param("item") G3Contractitem g3Contractitem, @Param("sql")String formula);

    Double selectMarginPriceById(@Param("item") G3Contractitem g3Contractitem, @Param("sql")String formula);
}
